package qldc.pm.tiensu.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import qldc.pm.tiensu.model.LichSuXoaAnTich;
import qldc.pm.tiensu.model.LichSuXoaAnTichModel;

import java.io.Serializable;

import java.sql.Types;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * The base model implementation for the LichSuXoaAnTich service. Represents a row in the &quot;TS_LichSuXoaAnTich&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link qldc.pm.tiensu.model.LichSuXoaAnTichModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link LichSuXoaAnTichImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see LichSuXoaAnTichImpl
 * @see qldc.pm.tiensu.model.LichSuXoaAnTich
 * @see qldc.pm.tiensu.model.LichSuXoaAnTichModel
 * @generated
 */
public class LichSuXoaAnTichModelImpl extends BaseModelImpl<LichSuXoaAnTich>
    implements LichSuXoaAnTichModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a lich su xoa an tich model instance should use the {@link qldc.pm.tiensu.model.LichSuXoaAnTich} interface instead.
     */
    public static final String TABLE_NAME = "TS_LichSuXoaAnTich";
    public static final Object[][] TABLE_COLUMNS = {
            { "lichSuXoaAnTichId", Types.BIGINT },
            { "tienSuId", Types.BIGINT },
            { "nguoiLapHoSoXoaAnTichId", Types.BIGINT },
            { "ngayLapHoSoXoaAnTich", Types.TIMESTAMP },
            { "nguoiYeuCauXoaAnTich", Types.VARCHAR },
            { "ngayYeuCauXoaAnTich", Types.TIMESTAMP },
            { "nguoiThucHienXoaAnTichTrongDuLieuID", Types.BIGINT },
            { "ngayKyDuyetXoaAnTich", Types.TIMESTAMP },
            { "maHoSoXoaAnTich", Types.VARCHAR },
            { "chuThich", Types.VARCHAR },
            { "kinhGui", Types.VARCHAR },
            { "hinhPhat", Types.VARCHAR },
            { "coQuanThiHanhAn", Types.VARCHAR },
            { "soQuyetDinhThiHanhAn", Types.VARCHAR },
            { "ngayQuyetDinhThiHanhAn", Types.TIMESTAMP },
            { "hoVaTenDoiTuongTienSu", Types.VARCHAR }
        };
    public static final String TABLE_SQL_CREATE = "create table TS_LichSuXoaAnTich (lichSuXoaAnTichId LONG not null primary key,tienSuId LONG,nguoiLapHoSoXoaAnTichId LONG,ngayLapHoSoXoaAnTich DATE null,nguoiYeuCauXoaAnTich VARCHAR(150) null,ngayYeuCauXoaAnTich DATE null,nguoiThucHienXoaAnTichTrongDuLieuID LONG,ngayKyDuyetXoaAnTich DATE null,maHoSoXoaAnTich VARCHAR(50) null,chuThich STRING null,kinhGui VARCHAR(400) null,hinhPhat STRING null,coQuanThiHanhAn VARCHAR(400) null,soQuyetDinhThiHanhAn VARCHAR(400) null,ngayQuyetDinhThiHanhAn DATE null,hoVaTenDoiTuongTienSu VARCHAR(100) null)";
    public static final String TABLE_SQL_DROP = "drop table TS_LichSuXoaAnTich";
    public static final String ORDER_BY_JPQL = " ORDER BY lichSuXoaAnTich.lichSuXoaAnTichId DESC";
    public static final String ORDER_BY_SQL = " ORDER BY TS_LichSuXoaAnTich.lichSuXoaAnTichId DESC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.qldc.pm.tiensu.model.LichSuXoaAnTich"),
            true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.qldc.pm.tiensu.model.LichSuXoaAnTich"),
            true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.qldc.pm.tiensu.model.LichSuXoaAnTich"),
            true);
    public static long HOVATENDOITUONGTIENSU_COLUMN_BITMASK = 1L;
    public static long MAHOSOXOAANTICH_COLUMN_BITMASK = 2L;
    public static long NGAYYEUCAUXOAANTICH_COLUMN_BITMASK = 4L;
    public static long TIENSUID_COLUMN_BITMASK = 8L;
    public static long LICHSUXOAANTICHID_COLUMN_BITMASK = 16L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.qldc.pm.tiensu.model.LichSuXoaAnTich"));
    private static ClassLoader _classLoader = LichSuXoaAnTich.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] {
            LichSuXoaAnTich.class
        };
    private long _lichSuXoaAnTichId;
    private long _tienSuId;
    private long _originalTienSuId;
    private boolean _setOriginalTienSuId;
    private long _nguoiLapHoSoXoaAnTichId;
    private Date _ngayLapHoSoXoaAnTich;
    private String _nguoiYeuCauXoaAnTich;
    private Date _ngayYeuCauXoaAnTich;
    private Date _originalNgayYeuCauXoaAnTich;
    private long _nguoiThucHienXoaAnTichTrongDuLieuID;
    private Date _ngayKyDuyetXoaAnTich;
    private String _maHoSoXoaAnTich;
    private String _originalMaHoSoXoaAnTich;
    private String _chuThich;
    private String _kinhGui;
    private String _hinhPhat;
    private String _coQuanThiHanhAn;
    private String _soQuyetDinhThiHanhAn;
    private Date _ngayQuyetDinhThiHanhAn;
    private String _hoVaTenDoiTuongTienSu;
    private String _originalHoVaTenDoiTuongTienSu;
    private long _columnBitmask;
    private LichSuXoaAnTich _escapedModel;

    public LichSuXoaAnTichModelImpl() {
    }

    @Override
    public long getPrimaryKey() {
        return _lichSuXoaAnTichId;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setLichSuXoaAnTichId(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _lichSuXoaAnTichId;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    @Override
    public Class<?> getModelClass() {
        return LichSuXoaAnTich.class;
    }

    @Override
    public String getModelClassName() {
        return LichSuXoaAnTich.class.getName();
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("lichSuXoaAnTichId", getLichSuXoaAnTichId());
        attributes.put("tienSuId", getTienSuId());
        attributes.put("nguoiLapHoSoXoaAnTichId", getNguoiLapHoSoXoaAnTichId());
        attributes.put("ngayLapHoSoXoaAnTich", getNgayLapHoSoXoaAnTich());
        attributes.put("nguoiYeuCauXoaAnTich", getNguoiYeuCauXoaAnTich());
        attributes.put("ngayYeuCauXoaAnTich", getNgayYeuCauXoaAnTich());
        attributes.put("nguoiThucHienXoaAnTichTrongDuLieuID",
            getNguoiThucHienXoaAnTichTrongDuLieuID());
        attributes.put("ngayKyDuyetXoaAnTich", getNgayKyDuyetXoaAnTich());
        attributes.put("maHoSoXoaAnTich", getMaHoSoXoaAnTich());
        attributes.put("chuThich", getChuThich());
        attributes.put("kinhGui", getKinhGui());
        attributes.put("hinhPhat", getHinhPhat());
        attributes.put("coQuanThiHanhAn", getCoQuanThiHanhAn());
        attributes.put("soQuyetDinhThiHanhAn", getSoQuyetDinhThiHanhAn());
        attributes.put("ngayQuyetDinhThiHanhAn", getNgayQuyetDinhThiHanhAn());
        attributes.put("hoVaTenDoiTuongTienSu", getHoVaTenDoiTuongTienSu());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        Long lichSuXoaAnTichId = (Long) attributes.get("lichSuXoaAnTichId");

        if (lichSuXoaAnTichId != null) {
            setLichSuXoaAnTichId(lichSuXoaAnTichId);
        }

        Long tienSuId = (Long) attributes.get("tienSuId");

        if (tienSuId != null) {
            setTienSuId(tienSuId);
        }

        Long nguoiLapHoSoXoaAnTichId = (Long) attributes.get(
                "nguoiLapHoSoXoaAnTichId");

        if (nguoiLapHoSoXoaAnTichId != null) {
            setNguoiLapHoSoXoaAnTichId(nguoiLapHoSoXoaAnTichId);
        }

        Date ngayLapHoSoXoaAnTich = (Date) attributes.get(
                "ngayLapHoSoXoaAnTich");

        if (ngayLapHoSoXoaAnTich != null) {
            setNgayLapHoSoXoaAnTich(ngayLapHoSoXoaAnTich);
        }

        String nguoiYeuCauXoaAnTich = (String) attributes.get(
                "nguoiYeuCauXoaAnTich");

        if (nguoiYeuCauXoaAnTich != null) {
            setNguoiYeuCauXoaAnTich(nguoiYeuCauXoaAnTich);
        }

        Date ngayYeuCauXoaAnTich = (Date) attributes.get("ngayYeuCauXoaAnTich");

        if (ngayYeuCauXoaAnTich != null) {
            setNgayYeuCauXoaAnTich(ngayYeuCauXoaAnTich);
        }

        Long nguoiThucHienXoaAnTichTrongDuLieuID = (Long) attributes.get(
                "nguoiThucHienXoaAnTichTrongDuLieuID");

        if (nguoiThucHienXoaAnTichTrongDuLieuID != null) {
            setNguoiThucHienXoaAnTichTrongDuLieuID(nguoiThucHienXoaAnTichTrongDuLieuID);
        }

        Date ngayKyDuyetXoaAnTich = (Date) attributes.get(
                "ngayKyDuyetXoaAnTich");

        if (ngayKyDuyetXoaAnTich != null) {
            setNgayKyDuyetXoaAnTich(ngayKyDuyetXoaAnTich);
        }

        String maHoSoXoaAnTich = (String) attributes.get("maHoSoXoaAnTich");

        if (maHoSoXoaAnTich != null) {
            setMaHoSoXoaAnTich(maHoSoXoaAnTich);
        }

        String chuThich = (String) attributes.get("chuThich");

        if (chuThich != null) {
            setChuThich(chuThich);
        }

        String kinhGui = (String) attributes.get("kinhGui");

        if (kinhGui != null) {
            setKinhGui(kinhGui);
        }

        String hinhPhat = (String) attributes.get("hinhPhat");

        if (hinhPhat != null) {
            setHinhPhat(hinhPhat);
        }

        String coQuanThiHanhAn = (String) attributes.get("coQuanThiHanhAn");

        if (coQuanThiHanhAn != null) {
            setCoQuanThiHanhAn(coQuanThiHanhAn);
        }

        String soQuyetDinhThiHanhAn = (String) attributes.get(
                "soQuyetDinhThiHanhAn");

        if (soQuyetDinhThiHanhAn != null) {
            setSoQuyetDinhThiHanhAn(soQuyetDinhThiHanhAn);
        }

        Date ngayQuyetDinhThiHanhAn = (Date) attributes.get(
                "ngayQuyetDinhThiHanhAn");

        if (ngayQuyetDinhThiHanhAn != null) {
            setNgayQuyetDinhThiHanhAn(ngayQuyetDinhThiHanhAn);
        }

        String hoVaTenDoiTuongTienSu = (String) attributes.get(
                "hoVaTenDoiTuongTienSu");

        if (hoVaTenDoiTuongTienSu != null) {
            setHoVaTenDoiTuongTienSu(hoVaTenDoiTuongTienSu);
        }
    }

    @Override
    public long getLichSuXoaAnTichId() {
        return _lichSuXoaAnTichId;
    }

    @Override
    public void setLichSuXoaAnTichId(long lichSuXoaAnTichId) {
        _columnBitmask = -1L;

        _lichSuXoaAnTichId = lichSuXoaAnTichId;
    }

    @Override
    public long getTienSuId() {
        return _tienSuId;
    }

    @Override
    public void setTienSuId(long tienSuId) {
        _columnBitmask |= TIENSUID_COLUMN_BITMASK;

        if (!_setOriginalTienSuId) {
            _setOriginalTienSuId = true;

            _originalTienSuId = _tienSuId;
        }

        _tienSuId = tienSuId;
    }

    public long getOriginalTienSuId() {
        return _originalTienSuId;
    }

    @Override
    public long getNguoiLapHoSoXoaAnTichId() {
        return _nguoiLapHoSoXoaAnTichId;
    }

    @Override
    public void setNguoiLapHoSoXoaAnTichId(long nguoiLapHoSoXoaAnTichId) {
        _nguoiLapHoSoXoaAnTichId = nguoiLapHoSoXoaAnTichId;
    }

    @Override
    public Date getNgayLapHoSoXoaAnTich() {
        return _ngayLapHoSoXoaAnTich;
    }

    @Override
    public void setNgayLapHoSoXoaAnTich(Date ngayLapHoSoXoaAnTich) {
        _ngayLapHoSoXoaAnTich = ngayLapHoSoXoaAnTich;
    }

    @Override
    public String getNguoiYeuCauXoaAnTich() {
        if (_nguoiYeuCauXoaAnTich == null) {
            return StringPool.BLANK;
        } else {
            return _nguoiYeuCauXoaAnTich;
        }
    }

    @Override
    public void setNguoiYeuCauXoaAnTich(String nguoiYeuCauXoaAnTich) {
        _nguoiYeuCauXoaAnTich = nguoiYeuCauXoaAnTich;
    }

    @Override
    public Date getNgayYeuCauXoaAnTich() {
        return _ngayYeuCauXoaAnTich;
    }

    @Override
    public void setNgayYeuCauXoaAnTich(Date ngayYeuCauXoaAnTich) {
        _columnBitmask |= NGAYYEUCAUXOAANTICH_COLUMN_BITMASK;

        if (_originalNgayYeuCauXoaAnTich == null) {
            _originalNgayYeuCauXoaAnTich = _ngayYeuCauXoaAnTich;
        }

        _ngayYeuCauXoaAnTich = ngayYeuCauXoaAnTich;
    }

    public Date getOriginalNgayYeuCauXoaAnTich() {
        return _originalNgayYeuCauXoaAnTich;
    }

    @Override
    public long getNguoiThucHienXoaAnTichTrongDuLieuID() {
        return _nguoiThucHienXoaAnTichTrongDuLieuID;
    }

    @Override
    public void setNguoiThucHienXoaAnTichTrongDuLieuID(
        long nguoiThucHienXoaAnTichTrongDuLieuID) {
        _nguoiThucHienXoaAnTichTrongDuLieuID = nguoiThucHienXoaAnTichTrongDuLieuID;
    }

    @Override
    public Date getNgayKyDuyetXoaAnTich() {
        return _ngayKyDuyetXoaAnTich;
    }

    @Override
    public void setNgayKyDuyetXoaAnTich(Date ngayKyDuyetXoaAnTich) {
        _ngayKyDuyetXoaAnTich = ngayKyDuyetXoaAnTich;
    }

    @Override
    public String getMaHoSoXoaAnTich() {
        if (_maHoSoXoaAnTich == null) {
            return StringPool.BLANK;
        } else {
            return _maHoSoXoaAnTich;
        }
    }

    @Override
    public void setMaHoSoXoaAnTich(String maHoSoXoaAnTich) {
        _columnBitmask |= MAHOSOXOAANTICH_COLUMN_BITMASK;

        if (_originalMaHoSoXoaAnTich == null) {
            _originalMaHoSoXoaAnTich = _maHoSoXoaAnTich;
        }

        _maHoSoXoaAnTich = maHoSoXoaAnTich;
    }

    public String getOriginalMaHoSoXoaAnTich() {
        return GetterUtil.getString(_originalMaHoSoXoaAnTich);
    }

    @Override
    public String getChuThich() {
        if (_chuThich == null) {
            return StringPool.BLANK;
        } else {
            return _chuThich;
        }
    }

    @Override
    public void setChuThich(String chuThich) {
        _chuThich = chuThich;
    }

    @Override
    public String getKinhGui() {
        if (_kinhGui == null) {
            return StringPool.BLANK;
        } else {
            return _kinhGui;
        }
    }

    @Override
    public void setKinhGui(String kinhGui) {
        _kinhGui = kinhGui;
    }

    @Override
    public String getHinhPhat() {
        if (_hinhPhat == null) {
            return StringPool.BLANK;
        } else {
            return _hinhPhat;
        }
    }

    @Override
    public void setHinhPhat(String hinhPhat) {
        _hinhPhat = hinhPhat;
    }

    @Override
    public String getCoQuanThiHanhAn() {
        if (_coQuanThiHanhAn == null) {
            return StringPool.BLANK;
        } else {
            return _coQuanThiHanhAn;
        }
    }

    @Override
    public void setCoQuanThiHanhAn(String coQuanThiHanhAn) {
        _coQuanThiHanhAn = coQuanThiHanhAn;
    }

    @Override
    public String getSoQuyetDinhThiHanhAn() {
        if (_soQuyetDinhThiHanhAn == null) {
            return StringPool.BLANK;
        } else {
            return _soQuyetDinhThiHanhAn;
        }
    }

    @Override
    public void setSoQuyetDinhThiHanhAn(String soQuyetDinhThiHanhAn) {
        _soQuyetDinhThiHanhAn = soQuyetDinhThiHanhAn;
    }

    @Override
    public Date getNgayQuyetDinhThiHanhAn() {
        return _ngayQuyetDinhThiHanhAn;
    }

    @Override
    public void setNgayQuyetDinhThiHanhAn(Date ngayQuyetDinhThiHanhAn) {
        _ngayQuyetDinhThiHanhAn = ngayQuyetDinhThiHanhAn;
    }

    @Override
    public String getHoVaTenDoiTuongTienSu() {
        if (_hoVaTenDoiTuongTienSu == null) {
            return StringPool.BLANK;
        } else {
            return _hoVaTenDoiTuongTienSu;
        }
    }

    @Override
    public void setHoVaTenDoiTuongTienSu(String hoVaTenDoiTuongTienSu) {
        _columnBitmask |= HOVATENDOITUONGTIENSU_COLUMN_BITMASK;

        if (_originalHoVaTenDoiTuongTienSu == null) {
            _originalHoVaTenDoiTuongTienSu = _hoVaTenDoiTuongTienSu;
        }

        _hoVaTenDoiTuongTienSu = hoVaTenDoiTuongTienSu;
    }

    public String getOriginalHoVaTenDoiTuongTienSu() {
        return GetterUtil.getString(_originalHoVaTenDoiTuongTienSu);
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
            LichSuXoaAnTich.class.getName(), getPrimaryKey());
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        ExpandoBridge expandoBridge = getExpandoBridge();

        expandoBridge.setAttributes(serviceContext);
    }

    @Override
    public LichSuXoaAnTich toEscapedModel() {
        if (_escapedModel == null) {
            _escapedModel = (LichSuXoaAnTich) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
        }

        return _escapedModel;
    }

    @Override
    public Object clone() {
        LichSuXoaAnTichImpl lichSuXoaAnTichImpl = new LichSuXoaAnTichImpl();

        lichSuXoaAnTichImpl.setLichSuXoaAnTichId(getLichSuXoaAnTichId());
        lichSuXoaAnTichImpl.setTienSuId(getTienSuId());
        lichSuXoaAnTichImpl.setNguoiLapHoSoXoaAnTichId(getNguoiLapHoSoXoaAnTichId());
        lichSuXoaAnTichImpl.setNgayLapHoSoXoaAnTich(getNgayLapHoSoXoaAnTich());
        lichSuXoaAnTichImpl.setNguoiYeuCauXoaAnTich(getNguoiYeuCauXoaAnTich());
        lichSuXoaAnTichImpl.setNgayYeuCauXoaAnTich(getNgayYeuCauXoaAnTich());
        lichSuXoaAnTichImpl.setNguoiThucHienXoaAnTichTrongDuLieuID(getNguoiThucHienXoaAnTichTrongDuLieuID());
        lichSuXoaAnTichImpl.setNgayKyDuyetXoaAnTich(getNgayKyDuyetXoaAnTich());
        lichSuXoaAnTichImpl.setMaHoSoXoaAnTich(getMaHoSoXoaAnTich());
        lichSuXoaAnTichImpl.setChuThich(getChuThich());
        lichSuXoaAnTichImpl.setKinhGui(getKinhGui());
        lichSuXoaAnTichImpl.setHinhPhat(getHinhPhat());
        lichSuXoaAnTichImpl.setCoQuanThiHanhAn(getCoQuanThiHanhAn());
        lichSuXoaAnTichImpl.setSoQuyetDinhThiHanhAn(getSoQuyetDinhThiHanhAn());
        lichSuXoaAnTichImpl.setNgayQuyetDinhThiHanhAn(getNgayQuyetDinhThiHanhAn());
        lichSuXoaAnTichImpl.setHoVaTenDoiTuongTienSu(getHoVaTenDoiTuongTienSu());

        lichSuXoaAnTichImpl.resetOriginalValues();

        return lichSuXoaAnTichImpl;
    }

    @Override
    public int compareTo(LichSuXoaAnTich lichSuXoaAnTich) {
        int value = 0;

        if (getLichSuXoaAnTichId() < lichSuXoaAnTich.getLichSuXoaAnTichId()) {
            value = -1;
        } else if (getLichSuXoaAnTichId() > lichSuXoaAnTich.getLichSuXoaAnTichId()) {
            value = 1;
        } else {
            value = 0;
        }

        value = value * -1;

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof LichSuXoaAnTich)) {
            return false;
        }

        LichSuXoaAnTich lichSuXoaAnTich = (LichSuXoaAnTich) obj;

        long primaryKey = lichSuXoaAnTich.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
        LichSuXoaAnTichModelImpl lichSuXoaAnTichModelImpl = this;

        lichSuXoaAnTichModelImpl._originalTienSuId = lichSuXoaAnTichModelImpl._tienSuId;

        lichSuXoaAnTichModelImpl._setOriginalTienSuId = false;

        lichSuXoaAnTichModelImpl._originalNgayYeuCauXoaAnTich = lichSuXoaAnTichModelImpl._ngayYeuCauXoaAnTich;

        lichSuXoaAnTichModelImpl._originalMaHoSoXoaAnTich = lichSuXoaAnTichModelImpl._maHoSoXoaAnTich;

        lichSuXoaAnTichModelImpl._originalHoVaTenDoiTuongTienSu = lichSuXoaAnTichModelImpl._hoVaTenDoiTuongTienSu;

        lichSuXoaAnTichModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<LichSuXoaAnTich> toCacheModel() {
        LichSuXoaAnTichCacheModel lichSuXoaAnTichCacheModel = new LichSuXoaAnTichCacheModel();

        lichSuXoaAnTichCacheModel.lichSuXoaAnTichId = getLichSuXoaAnTichId();

        lichSuXoaAnTichCacheModel.tienSuId = getTienSuId();

        lichSuXoaAnTichCacheModel.nguoiLapHoSoXoaAnTichId = getNguoiLapHoSoXoaAnTichId();

        Date ngayLapHoSoXoaAnTich = getNgayLapHoSoXoaAnTich();

        if (ngayLapHoSoXoaAnTich != null) {
            lichSuXoaAnTichCacheModel.ngayLapHoSoXoaAnTich = ngayLapHoSoXoaAnTich.getTime();
        } else {
            lichSuXoaAnTichCacheModel.ngayLapHoSoXoaAnTich = Long.MIN_VALUE;
        }

        lichSuXoaAnTichCacheModel.nguoiYeuCauXoaAnTich = getNguoiYeuCauXoaAnTich();

        String nguoiYeuCauXoaAnTich = lichSuXoaAnTichCacheModel.nguoiYeuCauXoaAnTich;

        if ((nguoiYeuCauXoaAnTich != null) &&
                (nguoiYeuCauXoaAnTich.length() == 0)) {
            lichSuXoaAnTichCacheModel.nguoiYeuCauXoaAnTich = null;
        }

        Date ngayYeuCauXoaAnTich = getNgayYeuCauXoaAnTich();

        if (ngayYeuCauXoaAnTich != null) {
            lichSuXoaAnTichCacheModel.ngayYeuCauXoaAnTich = ngayYeuCauXoaAnTich.getTime();
        } else {
            lichSuXoaAnTichCacheModel.ngayYeuCauXoaAnTich = Long.MIN_VALUE;
        }

        lichSuXoaAnTichCacheModel.nguoiThucHienXoaAnTichTrongDuLieuID = getNguoiThucHienXoaAnTichTrongDuLieuID();

        Date ngayKyDuyetXoaAnTich = getNgayKyDuyetXoaAnTich();

        if (ngayKyDuyetXoaAnTich != null) {
            lichSuXoaAnTichCacheModel.ngayKyDuyetXoaAnTich = ngayKyDuyetXoaAnTich.getTime();
        } else {
            lichSuXoaAnTichCacheModel.ngayKyDuyetXoaAnTich = Long.MIN_VALUE;
        }

        lichSuXoaAnTichCacheModel.maHoSoXoaAnTich = getMaHoSoXoaAnTich();

        String maHoSoXoaAnTich = lichSuXoaAnTichCacheModel.maHoSoXoaAnTich;

        if ((maHoSoXoaAnTich != null) && (maHoSoXoaAnTich.length() == 0)) {
            lichSuXoaAnTichCacheModel.maHoSoXoaAnTich = null;
        }

        lichSuXoaAnTichCacheModel.chuThich = getChuThich();

        String chuThich = lichSuXoaAnTichCacheModel.chuThich;

        if ((chuThich != null) && (chuThich.length() == 0)) {
            lichSuXoaAnTichCacheModel.chuThich = null;
        }

        lichSuXoaAnTichCacheModel.kinhGui = getKinhGui();

        String kinhGui = lichSuXoaAnTichCacheModel.kinhGui;

        if ((kinhGui != null) && (kinhGui.length() == 0)) {
            lichSuXoaAnTichCacheModel.kinhGui = null;
        }

        lichSuXoaAnTichCacheModel.hinhPhat = getHinhPhat();

        String hinhPhat = lichSuXoaAnTichCacheModel.hinhPhat;

        if ((hinhPhat != null) && (hinhPhat.length() == 0)) {
            lichSuXoaAnTichCacheModel.hinhPhat = null;
        }

        lichSuXoaAnTichCacheModel.coQuanThiHanhAn = getCoQuanThiHanhAn();

        String coQuanThiHanhAn = lichSuXoaAnTichCacheModel.coQuanThiHanhAn;

        if ((coQuanThiHanhAn != null) && (coQuanThiHanhAn.length() == 0)) {
            lichSuXoaAnTichCacheModel.coQuanThiHanhAn = null;
        }

        lichSuXoaAnTichCacheModel.soQuyetDinhThiHanhAn = getSoQuyetDinhThiHanhAn();

        String soQuyetDinhThiHanhAn = lichSuXoaAnTichCacheModel.soQuyetDinhThiHanhAn;

        if ((soQuyetDinhThiHanhAn != null) &&
                (soQuyetDinhThiHanhAn.length() == 0)) {
            lichSuXoaAnTichCacheModel.soQuyetDinhThiHanhAn = null;
        }

        Date ngayQuyetDinhThiHanhAn = getNgayQuyetDinhThiHanhAn();

        if (ngayQuyetDinhThiHanhAn != null) {
            lichSuXoaAnTichCacheModel.ngayQuyetDinhThiHanhAn = ngayQuyetDinhThiHanhAn.getTime();
        } else {
            lichSuXoaAnTichCacheModel.ngayQuyetDinhThiHanhAn = Long.MIN_VALUE;
        }

        lichSuXoaAnTichCacheModel.hoVaTenDoiTuongTienSu = getHoVaTenDoiTuongTienSu();

        String hoVaTenDoiTuongTienSu = lichSuXoaAnTichCacheModel.hoVaTenDoiTuongTienSu;

        if ((hoVaTenDoiTuongTienSu != null) &&
                (hoVaTenDoiTuongTienSu.length() == 0)) {
            lichSuXoaAnTichCacheModel.hoVaTenDoiTuongTienSu = null;
        }

        return lichSuXoaAnTichCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(33);

        sb.append("{lichSuXoaAnTichId=");
        sb.append(getLichSuXoaAnTichId());
        sb.append(", tienSuId=");
        sb.append(getTienSuId());
        sb.append(", nguoiLapHoSoXoaAnTichId=");
        sb.append(getNguoiLapHoSoXoaAnTichId());
        sb.append(", ngayLapHoSoXoaAnTich=");
        sb.append(getNgayLapHoSoXoaAnTich());
        sb.append(", nguoiYeuCauXoaAnTich=");
        sb.append(getNguoiYeuCauXoaAnTich());
        sb.append(", ngayYeuCauXoaAnTich=");
        sb.append(getNgayYeuCauXoaAnTich());
        sb.append(", nguoiThucHienXoaAnTichTrongDuLieuID=");
        sb.append(getNguoiThucHienXoaAnTichTrongDuLieuID());
        sb.append(", ngayKyDuyetXoaAnTich=");
        sb.append(getNgayKyDuyetXoaAnTich());
        sb.append(", maHoSoXoaAnTich=");
        sb.append(getMaHoSoXoaAnTich());
        sb.append(", chuThich=");
        sb.append(getChuThich());
        sb.append(", kinhGui=");
        sb.append(getKinhGui());
        sb.append(", hinhPhat=");
        sb.append(getHinhPhat());
        sb.append(", coQuanThiHanhAn=");
        sb.append(getCoQuanThiHanhAn());
        sb.append(", soQuyetDinhThiHanhAn=");
        sb.append(getSoQuyetDinhThiHanhAn());
        sb.append(", ngayQuyetDinhThiHanhAn=");
        sb.append(getNgayQuyetDinhThiHanhAn());
        sb.append(", hoVaTenDoiTuongTienSu=");
        sb.append(getHoVaTenDoiTuongTienSu());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(52);

        sb.append("<model><model-name>");
        sb.append("qldc.pm.tiensu.model.LichSuXoaAnTich");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>lichSuXoaAnTichId</column-name><column-value><![CDATA[");
        sb.append(getLichSuXoaAnTichId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>tienSuId</column-name><column-value><![CDATA[");
        sb.append(getTienSuId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiLapHoSoXoaAnTichId</column-name><column-value><![CDATA[");
        sb.append(getNguoiLapHoSoXoaAnTichId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayLapHoSoXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNgayLapHoSoXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiYeuCauXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNguoiYeuCauXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayYeuCauXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNgayYeuCauXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiThucHienXoaAnTichTrongDuLieuID</column-name><column-value><![CDATA[");
        sb.append(getNguoiThucHienXoaAnTichTrongDuLieuID());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayKyDuyetXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNgayKyDuyetXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>maHoSoXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getMaHoSoXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>chuThich</column-name><column-value><![CDATA[");
        sb.append(getChuThich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>kinhGui</column-name><column-value><![CDATA[");
        sb.append(getKinhGui());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hinhPhat</column-name><column-value><![CDATA[");
        sb.append(getHinhPhat());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>coQuanThiHanhAn</column-name><column-value><![CDATA[");
        sb.append(getCoQuanThiHanhAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>soQuyetDinhThiHanhAn</column-name><column-value><![CDATA[");
        sb.append(getSoQuyetDinhThiHanhAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayQuyetDinhThiHanhAn</column-name><column-value><![CDATA[");
        sb.append(getNgayQuyetDinhThiHanhAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hoVaTenDoiTuongTienSu</column-name><column-value><![CDATA[");
        sb.append(getHoVaTenDoiTuongTienSu());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
